xen/arm: vgic-v2: Map the GIC virtual CPU interface with the correct size
authorJulien Grall <julien.grall@citrix.com>
Thu, 17 Sep 2015 18:00:03 +0000 (19:00 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 21 Sep 2015 11:31:45 +0000 (12:31 +0100)
commit493a67ee4a3fd9420e94fa2cf108e2a27961202b
treef342a40fe7f2834497296bd04956ceb296f9d095
parentfa30003c13577b7ae4bbb46252ec1cbabd65c645
xen/arm: vgic-v2: Map the GIC virtual CPU interface with the correct size

On GICv2, the GIC virtual CPU interface is at minimum 8KB. Due some to
some necessary quirk for GIC using 64KB stride, we are mapping the
region in 2 time.
The first mapping is 4KB and the second one is 8KB, i.e 12KB in total.
Although the minimum supported size (and widely used) is 8KB. This means
that we are mapping 4KB more to any guest using GICv2.

While this looks scary at first glance, the GIC virtual CPU interface is
most frequently at the end the GIC I/O region. So we will most likely
map an an unused I/O region or a mirrored version of GICV for platform
using 64KB stride.

Nonetheless, fix the second mapping to only map 4KB.

Signed-off-by: Julien Grall <julien.grall@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/vgic-v2.c